﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<DeklaritModel.ProductDataSet>" %>


<%@ Import Namespace="System.Data" %>


<table width="100%" class="formPageBody" >
	<tr>
		<td colspan="2">
			<%= Html.ValidationSummary() %>
		</td>
	</tr> 
   <tr>
		<td>
			<%= Html.Hidden("ProductId", Model == null || Model.Product.Rows.Count == 0 ? (object)null : Model.Product[0].ProductId) %>
			<%= Html.Hidden("MenuAction") %>
			<%= Html.Hidden("Mode") %>
			<%= Html.Hidden("InstantiatedAttributes") %>
            <%= Html.Hidden("OptionAddedToCombo") %>
			<%  bool? prompt = (bool?)ViewData["Prompt"];   %>
            <%= Html.Hidden("Prompt", prompt) %>
            <%  if (prompt ?? false){
                    string promptAttribute = (string)ViewData["PromptAttribute"];
                    bool? promptReturn = (bool?)ViewData["PromptReturn"];    %>
                <%= Html.Hidden("PromptAttribute", promptAttribute) %>
                <%= Html.Hidden("Prompt_" + promptAttribute, Model == null || Model.Product.Rows.Count == 0 ? (object)null : Model.Product[0][promptAttribute]) %>
			    <%= Html.Hidden("PromptReturn", promptReturn.HasValue && promptReturn.Value ? "true" : "false")%>
            <%  } %>

	<table cellspacing="1" cellpadding="1" border="0">
		<tr>
			
     
     										<td class="nowrapClass smallWidth"     >
     											<label id="lblProductName1" class="formLabelDescription "  ><%=  Resources.StringResources.ProductProductNameDescription %></label>
     										</td>
				
			
     
     										<td class="nowrapClass"   >
     											<table cellspacing="1" cellpadding="0" border="0"  >
     												<tr>
     													<td class="nowrapClass" >
     														<%= Html.TextBox("ProductName", Model == null || Model.Product.Rows.Count == 0 ? (object)null : Model.Product[0].ProductName, "formText", "20", "20", ((EnumMode)ViewData["Mode"]) != EnumMode.Insert && ((EnumMode)ViewData["Mode"]) != EnumMode.Update || ViewData["ReadOnly_ProductName"] != null, "formTextView", false, "", false) %>
     													</td>
     												</tr>
     											</table>
     										</td>
     									
     
				
			<td>
			</td>
		</tr>
		<tr>
			
     
     										<td class="nowrapClass smallWidth"     >
     											<label id="lblProductType1" class="formLabelDescription "  ><%=  Resources.StringResources.ProductProductTypeDescription %></label>
     										</td>
				
			
     
     										<td class="nowrapClass"   >
     											<table cellspacing="1" cellpadding="0" border="0"  >
     												<tr>
     													<td class="nowrapClass" >
     														<%= Html.TextBox("ProductType", Model == null || Model.Product.Rows.Count == 0 ? (object)null : Model.Product[0].ProductType, "formText", "20", "20", ((EnumMode)ViewData["Mode"]) != EnumMode.Insert && ((EnumMode)ViewData["Mode"]) != EnumMode.Update || ViewData["ReadOnly_ProductType"] != null, "formTextView", false, "", false) %>
     													</td>
     												</tr>
     											</table>
     										</td>
     									
     
				
			<td>
			</td>
		</tr>
		<tr>
			
     
     										<td class="nowrapClass smallWidth"     >
     											<label id="lblProductSize1" class="formLabelDescription "  ><%=  Resources.StringResources.ProductProductSizeDescription %></label>
     										</td>
				
			
     
     										<td class="nowrapClass"   >
     											<table cellspacing="1" cellpadding="0" border="0"  >
     												<tr>
     													<td class="nowrapClass" >
     														<%= Html.TextBox("ProductSize", Model == null || Model.Product.Rows.Count == 0 ? (object)null : Model.Product[0].ProductSize, "formTextNumeric", "5", "5", ((EnumMode)ViewData["Mode"]) != EnumMode.Insert && ((EnumMode)ViewData["Mode"]) != EnumMode.Update || ViewData["ReadOnly_ProductSize"] != null, "formTextView", false, "", false) %>
     													</td>
     													<td class="nowrapClass" >
     													<!--
     														validador de numero correcto
     														<asp:CompareValidator runatt="server" CssClass="formValidatorLabel" id="ValidateDkTextProductSize" ControlToValidate="txtProductSize" Operator="DataTypeCheck" Type="Integer" ErrorMessage="<IMG src='~/Images/error.gif' border='0' align='absmiddle' alt='Please enter a valid number'>"></asp:CompareValidator>
     														-->
     													</td>
     													<td class="nowrapClass" >
     														<%= Html.ValidationMessage("ProductSize", "*", "formValidatorLabel") %>
     														<!--
     														<asp:RequiredFieldValidator runatt="server" CssClass="formValidatorLabel" id="ValidateRequiredDkNumberProductSize" ControlToValidate="txtProductSize" ErrorMessage="<IMG src='~/Images/error.gif' border='0' align='absmiddle' alt='Please enter a valid number'>"></asp:RequiredFieldValidator>
     														-->
     													</td>
     												</tr>
     											</table>
     										</td>
     									
     
				
			<td>
			</td>
		</tr>
		<tr>
			
     
     										<td class="nowrapClass smallWidth"     >
     											<label id="lblProductIsFragile1" class="formLabelDescription "  ><%=  Resources.StringResources.ProductProductIsFragileDescription %></label>
     										</td>
				
			
     
     										<td class="nowrapClass"   >
     											<%= Html.CheckBox("ProductIsFragile", Model == null || Model.Product.Rows.Count == 0 ? false : Model.Product[0].ProductIsFragile) %>											
     										</td>
     									
     
				
			<td>
			</td>
		</tr>
		<tr>
			
     
     										<td class="nowrapClass smallWidth"     >
     											<label id="lblProductClass1" class="formLabelDescription "  ><%=  Resources.StringResources.ProductProductClassDescription %></label>
     										</td>
				
			
     
     										<td class="nowrapClass"   >
     											<%= Html.DropDownList("ProductClass", MVCApplication.Helpers.EnumerationsHelper.GetProductClassSelectList(), Model == null || Model.Product.Rows.Count == 0 ? (object)null : (Int16)Model.Product[0].ProductClass, false, "", "", ((EnumMode)ViewData["Mode"]) != EnumMode.Insert && ((EnumMode)ViewData["Mode"]) != EnumMode.Update || ViewData["ReadOnly_ProductClass"] != null) %>
     										</td>
     									
     
				
			<td>
			</td>
		</tr>
		<tr>
			
				<td>
				</td>		
				
			
				<td>
				</td>		
				
			<td>
			</td>
		</tr>
	</table>
		</td>
	</tr>
	<tr class="formFooter">
		<td colspan="4">
	
			<table cellspacing="2" cellpadding="2" border="0">
				<tr>
					<td valign="bottom" colspan="1">
						<img src="<%= (string)Session["ThemePath"] %>Images/LeftBottom.gif" />
					</td>
					<td>
				<!--		<dkweb:DeklaritImageButton ID="btnConfirm" SkinID="DeklaritImageButton" runatt="server" CausesValidation="True"  Text="Confirm"  ></dkweb:DeklaritImageButton>	-->
					</td>
					<td >
				<!--		<dkweb:DeklaritImageButton ID="btnCancel" SkinID="DeklaritImageButton" runatt="server" CausesValidation="False"  Text="Cancel"  ></dkweb:DeklaritImageButton>	-->
					</td>
					<td valign="bottom" align="right" colspan="1">
						<img src="<%= (string)Session["ThemePath"] %>Images/RightBottom.gif" />
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
